* restore format options with positional parameters.
* fix positional test
name = nm;
}
+ QString get_argstring() const
+ {
+ return argstring;
+ }
+
+ void set_argstring(const QString& string)
+ {
+ argstring = string;
+ }
private:
QString name;
+ QString argstring;
protected:
template <class MyFormat>
* When debugging, announce version.
*/
if (global_opts.debug_level > 0) {
- warning("GPSBabel Version: %s \n", gpsbabel_version);
+ warning("GPSBabel Version: %s\n", gpsbabel_version);
warning(MYNAME ": Compiled with Qt %s for architecture %s\n",
QT_VERSION_STR,
qPrintable(QSysInfo::buildAbi()));
}
/* reinitialize xcsv in case two formats that use xcsv were given */
- (void) Vecs::Instance().find_vec(ivecs->get_name());
+ (void) Vecs::Instance().find_vec(ivecs->get_argstring());
cet_convert_init(ivecs->get_encode(), 1);
if (qargs.size() == 2 && ovecs) {
/* reinitialize xcsv in case two formats that use xcsv were given */
- (void) Vecs::Instance().find_vec(ovecs->get_name());
+ (void) Vecs::Instance().find_vec(ovecs->get_argstring());
cet_convert_init(ovecs->get_encode(), 1);
--- /dev/null
+TX: Frame Start a0 a2 Payload_Len 0003 Cmd: getfileheader
+RX: Start a0a2 Len 0005 Cmd: getfileheader
+found 0 headers, nextheader=0
+no further headers, aborting the loop
+TX: Frame Start a0 a2 Payload_Len 0001 Cmd: getconfig
+RX: Start a0a2 Len 002e Cmd: getconfig
+TX: Frame Start a0 a2 Payload_Len 0003 Cmd: erase
+RX: Start a0a2 Len 0005 Cmd: erase
gpsbabel -i dg-200-bin -f ${REFERENCE}/track/dg200.bin -o gpx -F ${TMPDIR}/dg200.gpx
compare ${REFERENCE}/track/dg200.gpx ${TMPDIR}/dg200.gpx
+
+# make sure we don't drop the options when the file is provided as a positional parameter
+gpsbabel -D3 -i dg-200-bin,erase -o gpx ${REFERENCE}/dg200erase.bin ${TMPDIR}/dg200erase.gpx 2>${TMPDIR}/dg200erase.log 1>/dev/null
+# Remove messages from main that depend on OS, Qt version, etc.
+grep -v main: <${TMPDIR}/dg200erase.log | grep -v "GPSBabel Version" >${TMPDIR}/dg200erase_clean.log
+compare ${REFERENCE}/dg200erase.log ${TMPDIR}/dg200erase_clean.log
xcsv_fmt.xcsv_setup_internal_style(nullptr);
#endif // CSVFMTS_ENABLED
vec.vec->set_name(vec.name); /* needed for session information */
+ vec.vec->set_argstring(vecname); /* needed for positional parameters */
return vec.vec;
}
#endif // CSVFMTS_ENABLED
vec_list[0].vec->set_name(svec.name); /* needed for session information */
+ vec_list[0].vec->set_argstring(vecname); /* needed for positional parameters */
return vec_list[0].vec;
}